package com.ydw.blog.service.imp;

import com.ydw.blog.dao.UserRepository;
import com.ydw.blog.entity.User;
import com.ydw.blog.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    UserRepository userRepository;
    @Override
    public User chckUser(String username, String password) {
        User user = userRepository.findByUsernameAndPassword(username, password);
        return user;
    }
}
